

//定义一个图书类（Book），包含书名（title）和作者（author）属性，提供一个静态方法来打印
//        所有图书Book[]的信息，并提供getter和setter方法。

package Job.thirtyThree;

public class Book {
    private String title;
    private String author;
    public Book(String title, String author) {
        this.title = title;
        this.author = author;
    }

    public static void printBooks(Book[] books) {
        for (Book book : books) {
            System.out.println("书名：" + book.getTitle() + "，作者：" + book.getAuthor());
        }
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }
}
